doc=paper

# Dynamic library flags (archetecture dependent), note the platforms here are   
# found by sys.platform in python, check there to see what your platform is     
UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
  VIEWPDFCMD=evince
endif
ifeq ($(UNAME), Darwin)
  VIEWPDFCMD=open
endif


default:
	pdflatex $(doc).tex
	pdflatex $(doc).tex
	$(VIEWPDFCMD) $(doc).pdf &

clean:
	-rm -fr ./*~ ./*.{log,aux,bbl,blg,nav,out,snm,toc}
